package com.dinpay.plugin.widget;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.text.Editable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnFocusChangeListener;
import android.widget.EditText;

public class CleanEditText extends EditText
  implements View.OnFocusChangeListener
{
  private Drawable a;
  private boolean b;
  private boolean c = false;
  private String d = "";
  public boolean showMobileType;
  public boolean showType;

  public CleanEditText(Context paramContext)
  {
    super(paramContext);
  }

  public CleanEditText(Context paramContext, AttributeSet paramAttributeSet)
  {
    this(paramContext, paramAttributeSet, 16842862);
  }

  public CleanEditText(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
  {
    super(paramContext, paramAttributeSet, paramInt);
    this.a.setBounds(0, 0, this.a.getIntrinsicWidth(), this.a.getIntrinsicHeight());
    a(false);
    setOnFocusChangeListener(this);
    addTextChangedListener(new a(this));
  }

  private void a(boolean paramBoolean)
  {
    if (paramBoolean);
    for (Drawable localDrawable = this.a; ; localDrawable = null)
    {
      setCompoundDrawables(getCompoundDrawables()[0], getCompoundDrawables()[1], localDrawable, getCompoundDrawables()[3]);
      setCompoundDrawablePadding(10);
      return;
    }
  }

  public void onFocusChange(View paramView, boolean paramBoolean)
  {
    this.b = paramBoolean;
    if (paramBoolean)
    {
      int i = getText().length();
      boolean bool = false;
      if (i > 0)
        bool = true;
      a(bool);
      return;
    }
    a(false);
  }

  public boolean onTouchEvent(MotionEvent paramMotionEvent)
  {
    int i = 1;
    if ((paramMotionEvent.getAction() == i) && (getCompoundDrawables()[2] != null))
      if ((paramMotionEvent.getX() <= getWidth() - getTotalPaddingRight()) || (paramMotionEvent.getX() >= getWidth() - getPaddingRight()))
        break label71;
    while (true)
    {
      if (i != 0)
        setText("");
      return super.onTouchEvent(paramMotionEvent);
      label71: i = 0;
    }
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.dinpay.plugin.widget.CleanEditText
 * JD-Core Version:    0.6.2
 */